﻿@model InnovaApp.Portals.MVC4Portal.Models.ViewModels.UploadUserIcon_ViewModel
@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <title>UploadUserIcon</title>
    @Scripts.Render("~/bundles/jquery")
</head>
<body>
    <div>
        @Html.TextBoxFor(m => m.ImgToUpdate, new { id = "hidImgToUpdate" })
        @Html.TextBoxFor(m => m.UploadedFileUrl, new { id = "hidUploadedFileUrl" })
    </div>
    <script type="text/javascript">
        ///<reference path="/Scripts/JQuery/jquery-1.8.3-vsdoc.js" />
        $(document).ready(function () {
            if (window.parent != null) {
                var d = new Date();
                var imgToUpdate = $("#hidImgToUpdate").val();
                var imgToUpdateObject = $(imgToUpdate, window.parent.document);
                //Workaround cache issue
                var iconPath = $("#hidUploadedFileUrl").val() + "?t=" + d.getTime();
                imgToUpdateObject.attr("src", iconPath);
                parent.$.fn.GoogleMapConfiguration(iconPath);
            }
        });
    </script>
    <div id="tmp"></div>
</body>
</html>
